//
//  BQMineHeaderView.m
//  BeeQuick
//
//  Created by Vivitickey on 2017/4/28.
//  Copyright © 2017年 test. All rights reserved.
//

#import "BQMineHeaderView.h"
#import "BQMyCouponVC.h"
#import "BQOrderTableVC.h"
@implementation BQMineHeaderView



- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self = [[NSBundle mainBundle]loadNibNamed:@"BQMineHeaderView" owner:self options:nil][0];
        [self setupUI];
    }
    return self;
}


-(void)setupUI{
    
    
    
}
- (IBAction)clickMyOrder:(id)sender {
    
    [[self viewController].navigationController pushViewController:[[BQOrderTableVC alloc]init] animated:YES];
}
- (IBAction)clickMyCoupon:(id)sender {
    
    [[self viewController].navigationController pushViewController:[[BQMyCouponVC alloc]init] animated:YES];
    
}
- (IBAction)clickMyOpinion:(id)sender {
}


- (UIViewController *)viewController {
    for (UIView * next = [self superview]; next; next = next.superview) {
        UIResponder * nextResponder = [next nextResponder];
        if ([nextResponder isKindOfClass:[UIViewController class]]) {
            return (UIViewController *)nextResponder;
        }
    }
    return nil;
}
@end

